@extends('admin.layout.main')

@section('content')
    <div class="breadcrumbs ace-save-state" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="ace-icon fa fa-home home-icon"></i>
                <a href="#">首页</a>
            </li>
            <li class="active"><a href="{{ url('admin/user_list') }}">会员列表</a></li>
        </ul><!-- /.breadcrumb -->

        <div class="nav-search" id="nav-search">

        </div><!-- /.nav-search -->
    </div>
    <form class="form-search" action="/admin/user_list" method="post">
        <span class="page-content">会员账号id：</span>
        <span class="input-icon">
        <input type="hidden" name="_token" value="{{csrf_token()}}"/>
		<input type="text"  name="like_account" value="{{$account}}" class="nav-search-input" id="nav-search-input" autocomplete="off" />
		</span>

        <span class="page-content">会员昵称：</span>
        <span class="input-icon">
		<input type="text"  name="like_nickname" value="{{$nickname}}" class="nav-search-input"  autocomplete="off" />
        </span>

        <span class="page-content">会员账号：</span>
        <span class="input-icon">
		<input type="text"  name="like_email" value="{{$email}}" placeholder="请输出完整的手机号或邮箱" class="nav-search-input"  autocomplete="off" />
        </span>
        <button class="btn btn-info" type="submit" >
                                查找
            </button>
    </form>
    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <div class="row left">
                    <h3>
                    </h3>
                </div>
                <!-- PAGE CONTENT BEGINS -->
                <div class="row">
                    <div class="col-xs-12">
                        <div class="clearfix">
                            <div class="pull-right tableTools-container"></div>
                        </div>
                    <div class="table-header">
                        <a href="/admin/add_user"><i class="menu-icon fa fa-plus orange"></i>
                            <span class="menu-text orange"> 添加会员 </span></a>

                        {{--<span class="menu-text orange"> 验证码记录 </span>--}}
                    </div>

                    <!-- div.table-responsive -->

                        <!-- div.dataTables_borderWrap -->
                        <div>
                            <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>会员账号ID</th>
                                    <th>
                                        昵称
                                    </th>
                                    <th>
                                        会员账号
                                    </th>
                                    <th>可用OBA</th>

                                    <th>冻结OBA</th>
                                    <th>可用USDT</th>
                                    <th>冻结USDT</th>
                                    <th>注册时间</th>
                                    <!--<th>状态</th>-->
                                    <th>实名认证</th>
                                    <th>操作</th>
                                </tr>
                                </thead>

                                <tbody>
                                @foreach($data as $key=>$val)
                                    <tr>
                                        <td>
                                            <a href="#">{{$key+1}}</a>
                                        </td>
                                        <td>{{$val['account']}}</td>
                                        <td>
                                            {{$val['nickname']}}
                                        </td>
                                        <td>
                                            @if(empty($val['email']))
                                            {{$val['phone']}}
                                                @else
                                            {{$val['email']}}
                                                @endif
                                        </td>
                                        <td>
                                            {{$val['balance_tlb']}}
                                        </td>
                                        <td>{{$val['blocked_tlb']}}</td>
                                        <td>{{$val['balance_btb']}}</td>
                                        <td>{{$val['blocked_btb']}}</td>
                                        <td>{{$val['time']}}</td>
                                        <!--<td>{{\App\Models\User::$STATUS[$val['status']]}}</td>-->
                                        <td>
                                        {{\App\Models\User::$REAL_STATUS[$val['real_status']]}}
                                        </td>
                                        <td>
                                            <a href="/admin/user_info?id={{$val['id']}}">
                                                <button class="btn btn-xs btn-info">个人信息</button>
                                            </a>

                                            <a href="/admin/finance_list?id={{$val['id']}}">
                                                <button class="btn btn-xs btn-warning">财务日志</button>
                                            </a>
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->

            <div class="modal-footer no-margin-top">
                <ul class="pagination pull-right no-margin">
                    @if(empty($url))
                    {{$result->links()}}
                    @else
                    {{$result->appends($url)->links()}}
                    @endif
                </ul>
            </div>
        </div><!-- /.row -->
    </div><!-- /.page-content -->

@endsection
